Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source generator for prototypes #1076

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

lahma
Copy link
Collaborator

@lahma lahma commented Feb 6, 2022

No description provided.

<ItemGroup>
<PackageReference Include="Esprima" />
<PackageReference Include="Meziantou.Analyzer" PrivateAssets="all" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" />
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For all tfms?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey let the man rebase in peace 😆

I've been experimenting, but the new switch-based compiler feature for string matching probably will make need obsolete. Jint already caches hash code for Key as we need to traverse different contexts and hash would be otherwise needed for each context level lookup.

/// <param name="r0">The reference to the target memory area to hash.</param>
/// <param name="length">The number of items to hash.</param>
/// <returns>The Djb2 value for the input sequence of items.</returns>
public static int GetDjb2HashCode<T>(ref T r0, nint length)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reasoning?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused, just part of all the cool or not so cool experiments...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants